Utils

Overview

API utility functions. Utilities for general operations to simplify methods or for items that are not accessible through API objects.

  • From version: 2020.20

Methods

getAllChips

getAllChips (): Chip []

Gets all the deployed chips from all the active Dropzones.

Const AllChips = cvApi2.utils.getAllChips();

Returns Chip[]

All the deployed chips from all the active Dropzones.

getChip

getChip ( chipUniqueName : string): Chip

Returns a Chip by its unique name. Use this function when quick access to a particular Chip is needed.

const chip = cvApi2.utils.getChip(chipUniqueName);

Parameters

  • chipUniqueName:string

    The chip unique id.

Returns Chip

Chip by its unique name.

getDropzone

getDropzone ( dropZoneType : DropZoneType ): Dropzone

Returns the matching Dropzone object using the DropZoneType. Null is returned if the drop zone is not being used in the visual. Use this function when quick access to a particular Dropzone is needed.

const xValuesDropZone = cvApi2.utils.getDropzone(cvApi2.enums.DropZoneType.XAxis);

Parameters

  • dropZoneType:DropZoneType

    Enum that represent the drop zone uniquely.

Returns Dropzone

Matching Dropzone object using the DropZoneType.

selectDatapoints

selectDatapoints ( datapoint : Datapoint []): void

Used to set selection state on a collection of datapoints. Used to respond to user interactions with the visual.

cvApi2.utils.selectDatapoints(datapoints);

Parameters

  • datapoint:Datapoint[]

    The datapoints we want to select in the Pyramid application.

Returns void

selectElements

selectElements ( elements : Element []): void

Used to set selection state on a collection of member elements. Used to respond to user interactions with the visual.

cvApi2.utils.selectElements(elements);

Parameters

  • elements:Element[]

    The elements we want to select.

Returns void